const DBUtils = require("../utils/DBUtils");


const db = new DBUtils();

let sql1 = `insert into ${this.currentTable} (account,password,nick_name,avatar,telephone,email,create_at) values (?,?,?,?,?,?,?)`;
let params1 = [account, password, nick_name, avatar, telephone, email, new Date()]


// db.executePromise(sql1, params1)
//     .then(result => {
//         let id = result.insertId;
//         let sql2 = `insert into ${this.tableMap.user_role_info} (user_id,role_id,create_at) values (?,?,?)`;
//         let params2 = [user_id, 2, new Date()];

//         return db.executePromise(sql2, params2)

//     }).then(result=>{
//         //所有的SQL成功
//         //提交事务
//     })